<script setup>
import { ref } from 'vue'
import { getUserList } from '@/api/test'

defineProps({
  msg: String,
})

const count = ref(0)

let data= ref("hhhh")

function increment() {
  count.value++
  console.log('count', count.value)
}
function test() {
  console.log('test')
  getUserList().then(res => {
    console.log('res', res)
    data.value=res
  })
}
</script>

<template>
  <p class="a2">{{ msg }}</p>
  <p class="a1">aaaaa</p>
  <van-button type="primary" size="normal" @click="increment" text="aaaa"/>
  <button @click="increment">Count is: {{ count }}</button>
  <hr>
  <div class="text-4xl font-600 italic underline">大标题</div>
  <div class="w-40 h-30 b-1 b-solid">带边框容器</div>
  <div class="read-the-docs" style="width:100px;height:100px;border: 1px solid;">Read the docs</div>
  <van-button type="primary" size="normal" @click="test" text="请求"/>
  <div>{{data}}</div>
  <hr>
</template>

<style scoped>
.read-the-docs {
  color: #888;
}
.a1 {
  color: red;
  font-size: 2rem;
} 
.a2 {
  color: blue;
  font-size: 2em;
}
</style>
